import request from '@/utils/request'
// 查询影视列表
export function getMovieList(query) {
    return request({
        url: '/movie',
        method: 'get',
        params: query
    })
}

//id查询
export function getMovie(id) {
    return request({
        url: `http://localhost:8080/movie/${id}`,
        method: 'get'
    })
}

// 新增影视
export function addMovie(data) {
    return request({
        url: '/movie',
        method: 'post',
        data: data
    })
}

// 修改影视
export function updateMovie(data) {
    return request({
        url: '/movie',
        method: 'put',
        data: data
    })
}

// 删除影视
export function delMovie(vid) {
    return request({
        url: '/movie/' + vid,
        method: 'delete'
    })
}
